package com.iot08.push.service;

import com.iot08.common.entity.app.OpenidConfig;
import com.iot08.common.service.base.BaseService;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.stereotype.Service;
import org.springframework.data.mongodb.core.query.Query;

import java.util.List;
import java.util.Set;

/**
 * @version 1.0
 * @Description:
 * @time: 2020/9/22 18:49
 * @author: Rock
 */
@Service
public class OpenidConfigService extends BaseService<OpenidConfig> {

    /**
     * @param openids
     * @time: 2020/12/9 9:13
     * @author: Rock
     * @version 1.0
     */
    public List<OpenidConfig> listByOpenId(Set<String> openids) {
        Query query = new Query(Criteria.where("_id").in(openids));
        query.fields().include("_id").include("openid").include("mobile_type").include("ios_production").include("version").include("packageName");
        return this.find(query);
    }

}
